package cn.com.thingo.hyintelligent.model.http;


import java.util.List;

import cn.com.thingo.hyintelligent.model.bean.BaseBean;
import cn.com.thingo.hyintelligent.model.bean.CommonBean;
import cn.com.thingo.hyintelligent.model.bean.EzAccountBean;
import cn.com.thingo.hyintelligent.model.bean.DoorLockAuthBean;
import cn.com.thingo.hyintelligent.model.bean.EzAddDevicePermissionBean;
import cn.com.thingo.hyintelligent.model.bean.EzDeleteDevicePermissionBean;
import cn.com.thingo.hyintelligent.model.bean.EzDeviceAuthorizationListBean;
import cn.com.thingo.hyintelligent.model.bean.EzDevicePolicyBean;
import cn.com.thingo.hyintelligent.model.bean.EzDeviceStateBean;
import cn.com.thingo.hyintelligent.model.bean.GatewayDetailBean;
import cn.com.thingo.hyintelligent.model.bean.GatewayListBean;
import cn.com.thingo.hyintelligent.model.bean.GetEzTokenBean;
import cn.com.thingo.hyintelligent.model.bean.LoginBean;
import cn.com.thingo.hyintelligent.model.bean.MessageCountBean;
import cn.com.thingo.hyintelligent.model.bean.MessageListBean;
import cn.com.thingo.hyintelligent.model.bean.ModifyHeadBean;
import cn.com.thingo.hyintelligent.model.bean.RegisterBean;
import cn.com.thingo.hyintelligent.model.bean.UserBean;
import io.reactivex.Flowable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;

/**
 * Created by Administrator on 2017/10/9.
 */

public interface HttpHelper {

    //获取手机验证码
    Flowable<CommonBean> getCode(String telephone);

    //注册
    Flowable<RegisterBean> register(String password, String telephone, String code);

    //登录
    Flowable<LoginBean> login(String password, String telephone);

    //网关列表
    Flowable<GatewayListBean> gatewayList(String token);

    //添加网关
    Flowable<CommonBean> addGateway(String token, String number, String name, String username, String password);

    //修改网关
    Flowable<CommonBean> modifyGateway(String token, String gatewayId, String name);

    //刪除网关
    Flowable<CommonBean> deleteGateway(String token, String gatewayId);

    //获取网关（授权）信息
    Flowable<GatewayDetailBean> gatewayDetail(String token, String gatewayId);

    //添加授权
    Flowable<CommonBean> addAuth(String token, String gatewayId, String telephone);

    //删除授权
    Flowable<CommonBean> delAuth(String token, String gatewayId, String telephone);

    //获取个人信息
    Flowable<UserBean> getUser(String token);


    //修改头像
    Flowable<ModifyHeadBean> modifyHead(RequestBody token, MultipartBody.Part headPic);

    //获取手机验证码
    Flowable<CommonBean> getCodeByModifyPassword(String telephone);

    //注册
    Flowable<CommonBean> modifyPassword(String password, String telephone, String code);


    //注册萤石云子账户
    Flowable<BaseBean> createEzAccount(String token, String accountName, String password, String accessToken);

    //添加萤石云设备
    Flowable<EzDeviceStateBean> addEzDevice(String deviceSerial, String validateCode);

    //删除萤石云设备
    Flowable<EzDeviceStateBean> deleteEzDevice(String deviceSerial);

    //设置设备权限
    Flowable<EzDevicePolicyBean> setEzDevicePolicy(String accountId, String policy);

    //添加设备权限
    Flowable<BaseBean> addEzDevicePermission(String accessToken, String tel, String toTel, String statement);

    //删除设备权限
    Flowable<BaseBean> deleteEzDevicePermission(String accessToken, String tel, String toTel, String deviceSerial);

    //获取监控设备授权列表
    Flowable<BaseBean<List<EzDeviceAuthorizationListBean>>> getEzDeviceAuthorzationList(String accessToken, String tel, String toTel);

    //获取萤石管理员账户token
    Flowable<BaseBean<String>> getAdminEzToken(String token, String secret, String appkey);

    //获取子账户信息
    Flowable<BaseBean<EzAccountBean>> getSonAccountMsg(String token, String accessToken);

    //添加门锁授权
    Flowable<CommonBean> addDoorLockAuth(String token, String gatewayId, String telephone);

    //删除门锁授权
    Flowable<CommonBean> delDoorLockAuth(String token, String gatewayId, String telephone);

    //门锁授权列表
    Flowable<DoorLockAuthBean> doorLockAuthList(String token, String gatewayId);

    //添加用户报警信息
    Flowable<CommonBean> addMessage(String token, String title, String content);

    //用户报警信息列表
    Flowable<MessageListBean> messageList(String token);

    //用户信息未读数
    Flowable<MessageCountBean> messageCount(String token);

    //阅读消息
    Flowable<CommonBean> readMessage(String token, String messageId);

    //登出
    Flowable<CommonBean> logout(String token);
}
